import Home from '@/views/Home.vue'
import { RouterView } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Index',
    redirect: '/ssyq/list',
    component: Home,
    meta: {
      title: '首页'
    },
    children: [
      {
        path: '/ssyq/list',
        name: 'ssyq-list',
        meta: {
          title: '实时舆情线索管理列表'
        },
        component: RouterView, // 无页面
        children: [
          {
            parentPath: 'ssyq-list',
            path: '',
            name: 'ssyq-list',
            meta: {
              title: '实时舆情线索管理列表'
            },
            component: () => import('@/views/SSYQ/List.vue')
          },
          {
            parentPath: 'ssyq-list',
            path: 'detail',
            name: `ssyq-detail`,
            meta: {
              title: '实时舆情线索管理详情'
            },
            component: () => import('@/views/SSYQ/Detail.vue')
          }
        ]
      },
      {
        path: '/qyyq/list',
        name: 'qyyq-list',
        meta: {
          title: '区域舆情线索管理列表'
        },
        component: RouterView, // 无页面
        children: [
          {
            parentPath: 'qyyq-list',
            path: '',
            name: 'qyyq-list',
            meta: {
              title: '区域舆情线索管理列表'
            },
            component: () => import('@/views/QYYQ/List.vue')
          },
          {
            parentPath: 'qyyq-list',
            path: 'detail',
            name: `qyyq-detail`,
            meta: {
              title: '区域舆情线索管理详情'
            },
            component: () => import('@/views/QYYQ/Detail.vue')
          }
        ]
      },
      {
        path: '/zxyq/list',
        name: 'zxyq-list',
        meta: {
          title: '专项舆情线索管理列表'
        },
        component: RouterView, // 无页面
        children: [
          {
            parentPath: 'zxyq-list',
            path: '',
            name: 'zxyq-list',
            meta: {
              title: '专项舆情线索管理列表'
            },
            component: () => import('@/views/ZXYQ/List.vue')
          },
          {
            parentPath: 'zxyq-list',
            path: 'detail',
            name: `zxyq-detail`,
            meta: {
              title: '专项舆情线索管理详情'
            },
            component: () => import('@/views/ZXYQ/Detail.vue')
          }
        ]
      },
      {
        path: '/yqxs/list',
        name: 'yqxs-list',
        meta: {
          title: '舆情线索预警管理列表'
        },
        component: RouterView, // 无页面
        children: [
          {
            parentPath: 'yqxs-list',
            path: '',
            name: 'yqxs-list',
            meta: {
              title: '舆情线索预警管理列表'
            },
            component: () => import('@/views/YQXS/List.vue')
          },
          {
            parentPath: 'yqxs-list',
            path: 'detail',
            name: `yqxs-detail`,
            meta: {
              title: '舆情线索预警管理详情'
            },
            component: () => import('@/views/YQXS/Detail.vue')
          }
        ]
      },
      {
        path: '/znss/list',
        name: 'znss-list',
        meta: {
          title: '智能实时预警管理列表'
        },
        component: RouterView, // 无页面
        children: [
          {
            parentPath: 'znss-list',
            path: '',
            name: 'znss-list',
            meta: {
              title: '智能实时预警管理列表'
            },
            component: () => import('@/views/ZNSS/List.vue')
          },
          {
            parentPath: 'znss-list',
            path: 'detail',
            name: `znss-detail`,
            meta: {
              title: '智能实时预警管理详情'
            },
            component: () => import('@/views/ZNSS/Detail.vue')
          }
        ]
      }
    ]
  }
]

export default routes
